home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 3 / Amiga Tools 3.iso / rexx / zoomnonprop.pvrx < prev    next >
Text File  |  1993-08-12  |  988b  |  52 lines

  1. /* $VER: ZoomNonProp.pvrx 3.0 (10.Aug.93) */
  2. /* Zooms into exact area lassoed.
  3.  
  4.     Suggested "ProVector.pvrx" entry:
  5.  
  6.         'Define "ZoomNonProp      " ZoomNonProp'
  7.     
  8.     Copyright © 1993 by Stylus, Inc.
  9. */
  10.  
  11. options results
  12.  
  13. /* Obtain exclusive access to ProVector(tm); quit if not possible */
  14. 'Lock Wait'
  15. if rc ~= 0 then exit
  16.  
  17. Cmd = ""
  18. /* Get the argument list to see whether this is a menu or an OK (callback) */
  19. arg arglist
  20. Cmd = word(arglist,1)
  21.  
  22. if Cmd = "" then do
  23.     /* This was called directly from the menu */
  24.     'Prompt "Click & drag to mark area"' 
  25.     /* Get a rubber-banded area and call back */
  26.     'GetUserData 2 2 2 "ZoomNonProp OK" ""'
  27. end
  28. else if Cmd = "OK" then do
  29.     /* This was called from GetUserData */
  30.     'EndPrompt'
  31.     'GetInputPoints Pts'
  32.     View.X1 = Pts.0.X
  33.     View.Y1 = Pts.0.Y
  34.     View.X2 = Pts.1.X
  35.     View.Y2 = Pts.1.Y
  36.     'SetView View'
  37.     'Repair'
  38. end
  39.  
  40.  
  41. CleanUp:
  42.     'UnLock'        /* Always be sure to unlock ProVector */
  43.     EXIT
  44.  
  45.  
  46. Error:
  47.     arg String
  48.     'GetBool String "Cancel" "Cancel"'
  49.     'UnLock'
  50.     exit
  51.  
  52.